status: Include deployment index in JSON output
authorLewis Cook <lcook@FreeBSD.org>
Sat, 20 Sep 2025 08:55:49 +0000 (09:55 +0100)
committerLewis Cook <lcook@FreeBSD.org>
Sat, 20 Sep 2025 09:48:30 +0000 (10:48 +0100)
src/ostree/ot-admin-builtin-status.c

index b84fbba2d33d52b78c251462a77d2bf83610ac33..459f28f01a2f935a140f597ca81b4884bf6ada70 100644 (file)
@@ -203,6 +203,7 @@ deployment_write_json (OstreeSysroot *sysroot, OstreeRepo *repo, OstreeDeploymen
   ul_jsonwrt_value_s (jo, "checksum", ref);
   ul_jsonwrt_value_s (jo, "stateroot", ostree_deployment_get_osname (deployment));
   ul_jsonwrt_value_u64 (jo, "serial", ostree_deployment_get_deployserial (deployment));
+  ul_jsonwrt_value_u64 (jo, "index", ostree_deployment_get_index (deployment));
   ul_jsonwrt_value_boolean (jo, "booted", is_booted);
   ul_jsonwrt_value_boolean (jo, "pending", is_pending);
   ul_jsonwrt_value_boolean (jo, "rollback", is_rollback);